import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 周斌
 * Date: 2024-06-12
 * Time: 15:39
 */
public class Deom18 {
    public static int count;
    public static void main(String[] args) {
        Thread t1 = new Thread(() -> {
            while(count == 0) {
                //未执行操作
            }
            System.out.println("退出t1线程");
        });

        Thread t2 = new Thread(() -> {
            Scanner scanner = new Scanner(System.in);
            System.out.println("输入一个数：");
            count = scanner.nextInt();
        });
        t1.start();
        t2.start();
    }
}
